fix: shorter codegen name#1251
Merged
kirillzyusko merged 2 commits intomainfrom Dec 17, 2025
Merged
Conversation
Contributor
📊 Package size report
|
kirillzyusko
added a commit
that referenced
this pull request
Jan 12, 2026
## 📜 Description Added a job for building example app on windows and shortened `codegen` name to fix build errors. ## 💡 Motivation and Context This is a continuation of #1251 In #1251 we shortened codegen name from `reactnativekeyboardcontroller` till `keyboardcontroller`. In this PR we make it even shorter: from `keyboardcontroller` -> `RNKC`. The `keyboardcontroller` has 18 symbols, `safeareacontext` (very popular lib) has 15 symbols, so our lib will exceed symbols limitation, when `safeareacontext` will not. Now I make length only 4 symbols. While I'm not a big fan of making variables/pathname shorter, because it makes more effort for newcomers to understand the code, but here I'm ready to sacrifice readability in favor of smaller amount of issues with complaints that builds are failing on windows. I hope in 2026 RN team will update Ninja/CMake to newest version and this limitation will gone, but for now let's use shorter name and fix windows build errors. Also I'd like to say few words about CI job. I've tried to assemble example app on windows runners, but I had compilation errors because of reanimated. So I went in a different direction. I create a new app and then link my lib locally to this project (just to check compilation issues). Not very elegant but it does its job - it gives me more confidence, that windows builds are not occasionally get broken 🤞 Closes #1247 #1147 #1253 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### CI - add a job for windows builds; ### iOS - make codegen name shorter; ### Android - make codegen name shorter; ### C++ - make codegen name shorter; ## 🤔 How Has This Been Tested? Tested on CI. ## 📸 Screenshots (if appropriate): |Before|After| |-------|-----| |<img width="1250" height="824" alt="image" src="https://github.com/user-attachments/assets/fa9a34de-3451-4689-9964-37b3f4576ca8" />|<img width="1201" height="203" alt="image" src="https://github.com/user-attachments/assets/8788f6b8-3299-48f8-9d97-c91dd1a69c85" />| ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Use
keyboardcontrollerinstead ofreactnativekeyboardcontrolleras c++ library name.💡 Motivation and Context
Using
reactnativekeyboardcontrollerproduces very long pathnames, for example:reactnativekeyboardcontroller_autolinked_build/CMakeFiles/react_codegen_reactnativekeyboardcontroller.dir/C_/Users/irust/connect/node_modules/react-native-keyboard-controller/common/cpp/react/renderer/components/reactnativekeyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp.o-> 282 symbols (which exceeds the limit of 260 characters on Windows).With
keyboardcontrollerit will bekeyboardcontroller_autolinked_build/CMakeFiles/react_codegen_keyboardcontroller.dir/C_/Users/irust/connect/node_modules/react-native-keyboard-controller/common/cpp/react/renderer/components/keyboardcontroller/RNKCKeyboardBackgroundViewShadowNode.cpp.o(which is only 251 symbol).This PR will not fix all problems with linking on windows, but at least if project is close to the beginning of the root of the disk (i. e.
C_/Users/irust/connect) the project will be assembled without errors 🤷♂️Important
I had to remove
FabricExample/android/build/generated/autolinking/autolinking.jsonso that the file can be re-assembled again to avoid compilation errors.Closes #1147 #1247
📢 Changelog
JS
reactnativekeyboardcontroller->keyboardcontrolleriOS
reactnativekeyboardcontroller->keyboardcontrollerAndroid
reactnativekeyboardcontroller->keyboardcontrollerC++
reactnativekeyboardcontroller->keyboardcontroller🤔 How Has This Been Tested?
Tested manually via this PR + locally run fabric build on iOS/Android.
📸 Screenshots (if appropriate):
📝 Checklist